<html>
 <head>
 <title>SchoolMate - School Name</title>
 <style type="text/css">

 /* BODY */
 body
 {
  background-color: #336699;
 }

 /* LINKS */
  A.footer
  {
    font-family: arial;
    font-size: 10pt;
    font-weight: normal;
    color: silver;
    text-decoration: underline;
  }

  A.footer:hover
  {
    font-family: arial;
    font-size: 10pt;
    font-weight: normal;
    color: black;
	text-decoration: underline;
  }

  A.menu
  {
	font-family: arial;
	font-size: 12pt;
	font-weight: bold;
	color: #e6ca3d;
	text-decoration: none;
  }

  A.menu:hover
  {
	font-family: arial;
    font-size: 12pt;
    font-wight: bold;
	color: #FFFFBB;
    text-decoration: none;
  }

  A.pagenum
  {
   font-family: arial;
   font-size: 10pt;
   font-weight: normal;
   color: #808080;
   text-decoration: none;
  }

  A.pagenum:hover
  {
   font-family: arial;
   font-size: 10pt;
   font-weight: normal;
   color: #ACACAC;
   text-decoration: none;
  }

  A.selectedpagenum
  {
   font-family: arial;
   font-size: 10pt;
   font-weight: normal;
   color: #000000;
   text-decoration: underline;
  }

  A.selectedpagenum:hover
  {
   font-family: arial;
   font-size: 10pt;
   font-weight: normal;
   color: #ACACAC;
   text-decoration: underline;
  }

  A.items
  {
   font-family: arial;
   font-size: 10pt;
   font-weight: normal;
   color: #000000;
   text-decoration: underline;
  }

  A.items:hover
  {
   font-family: arial;
   font-size: 10pt;
   font-weight: normal;
   color: #5F5F5F;
   text-decoration: underline;
  }

  /* TABLES */
  table
  {
	background-color: #FFFFFF;
  }

  table.y
  {
	background-color: #FFFFBB;
  }

  table.dynamiclist
  {
   border-color: #585858;
   border-width: .075EM;
   border-style: solid;
   padding-right: 1px;
   padding-bottom: 1px;
   padding-left: 0px;
   padding-top: 0px;
  }

  td.b
  {
   background-color: #336699;
  }

  td.bv
  {
   background-color: #336699;
   background-repeat: repeat-y;
  }

  td.w
  {
   background-color: #FFFFFF;
  }

  td.announcement
  {
   text-align: justify;
   padding-left: 20px;
   padding-right: 20px;
  }

  .odd
  {
   background-color: #ACACAC;
   text-align: center;
  }

  .even
  {
   background-color: #E0E0E0;
   text-align: center;
  }

  .header
  {
   background-color: #FFFFBB;
  }

 /* HEADERS */
  h1
  {
   	font-family: times;
    font-size: 22pt;
    font-weight: bold;
    color: #000000;
    text-decoration: none;
    text-align: center;
  }

  h2.message
  {
	font-family: times;
    font-size: 16pt;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
  }

 /* CUSTOM CLASSES */
  .messagebox
  {
	background-color: #FFFFBB;
	border-style: solid;
	border-width: .075EM;
	border-color: #e6ca3d;
	padding: 10px 10px 10px 10px;
	min-width: 150px;
	min-height: 150px;
	width: 300;
	height: 200;
	font-family: arial;
	font-size: 10pt;
	text-align: left;
	overflow: none;
  }

  .messageboxcenter
  {
	background-color: #FFFFBB;
	border-style: solid;
	border-width: .075EM;
	border-color: #e6ca3d;
	padding: 10px 10px 10px 10px;
	min-width: 150px;
	min-height: 50px;
	width: 300;
	height: 200;
	font-family: arial;
	text-align: center;
	vertical-align: middle;
	overflow: auto;
  }

  .footer
  {
    font-family: arial;
    font-size: 10pt;
    font-weight: normal;
    color: silver;
  }

  .yellowtext
  {
	font-family: times;
	font-size: 25pt;
	font-weight: normal;
	color: #e6ca3d;
	text-decoration: none;
  }


</style>
</head>
 <script language='JavaScript'>
  function logoutAdmin()
  {
	document.admin.logout.value=1;
	document.admin.submit();
  }

  function classes()
  {
	document.admin.page2.value=0;
	document.admin.submit();
  }

  function schoolInfo()
  {
	document.admin.page2.value=1;
	document.admin.submit();
  }

  function students()
  {
	document.admin.page2.value=2;
	document.admin.submit();
  }

  function teachers()
  {
	document.admin.page2.value=3;
	document.admin.submit();
  }

  function announcements()
  {
	document.admin.page2.value=4;
	document.admin.submit();
  }

  function semesters()
  {
	document.admin.page2.value=5;
	document.admin.submit();
  }

  function terms()
  {
	document.admin.page2.value=6;
	document.admin.submit();
  }

  function users()
  {
	document.admin.page2.value=10;
	document.admin.submit();
  }

  function parents()
  {
	document.admin.page2.value=22;
	document.admin.submit();
  }

  function register()
  {
	document.admin.page2.value=26;
	document.admin.submit();
  }

  function attendance()
  {
	document.admin.page2.value=30;
	document.admin.submit();
  }
 </script>

 <body><table cellpadding=0 cellspacing=0 border=0 width='100%' height='80'>
 <tr>

 <td class='b' width='300'>
  <img src='/images/title.gif' height='75' width='300' />
 </td>
 <td class='b'>
  <table cellpadding=0 cellspacing=0 border=0 width='80%'>
  <tr>
  <td class='b'>
   <div class='yellowtext' align='center'>School Name</div>

  </td>
  </tr>
  </table>
 </td>
</tr>
</table>

 <table width='100%' height='88%' border=0 cellspacing=0 cellpadding=0 align='center'>
 <tr>
  <td class='b' width='130' height=10><empty></td>

  <td class='b' width=10 background='/images/topleft.gif'><empty></td>
  <td class='b' height=10 background='/images/top.gif'><empty></td>
  <td class='b' width=10 background='/images/topright.gif'><empty></td>
 </tr>


 <tr>
  <td class='b' width=130 valign='top'>
   <br>
   <form name='admin' action='index.php' method='POST'>

   <a class='menu' href='javascript: schoolInfo();' onMouseover="window.status='Manage School Information'; return true;" onMouseout="window.status=''; return true;">School</a>
   <br><br>
   <a class='menu' href='javascript: terms();' onMouseover="window.status='Manage Terms'; return true;" onMouseout="window.status=''; return true;">Terms</a>
   <br><br>
   <a class='menu' href='javascript: semesters();' onMouseover="window.status='Manage Semesters'; return true;" onMouseout="window.status=''; return true;">Semesters</a>
   <br><br>
   <a class='menu' href='javascript: classes();' onMouseover="window.status='Manage Classes'; return true;" onMouseout="window.status=''; return true;">Classes</a>

   <br><br>
   <a class='menu' href='javascript: users();' onMouseover="window.status='Manage Users'; return true;" onMouseout="window.status=''; return true;">Users</a>
   <br><br>
   <a class='menu' href='javascript: teachers();' onMouseover="window.status='Manage Teachers'; return true;" onMouseout="window.status=''; return true;">Teachers</a>
   <br><br>
   <a class='menu' href='javascript: students();' onMouseover="window.status='Manage Students'; return true;" onMouseout="window.status=''; return true;">Students</a>
   <br><br>

   <a class='menu' href='javascript: register();' onMouseover="window.status='Register Students for Classes'; return true;" onMouseout="window.status=''; return true;">Registration</a>
   <br><br>
   <a class='menu' href='javascript: attendance();' onMouseover="window.status='Keep Attendance'; return true;" onMouseout="window.status=''; return true;">Attendance</a>
   <br><br>
   <a class='menu' href='javascript: parents();' onMouseover="window.status='Manage Parents'; return true;" onMouseout="window.status=''; return true;">Parents</a>
   <br><br>
   <a class='menu' href='javascript: announcements();' onMouseover="window.status='Manage Announcements'; return true;" onMouseout="window.status=''; return true;">Announcements</a>

   <br><br>
   <a class='menu' href='javascript: logoutAdmin();' onMouseover="window.status='Log Out';return true;" onMouseout="window.status='';return true;">Log Out</a>

   <input type='hidden' name='page2' value='0'>
   <input type='hidden' name='logout'>
   <input type='hidden' name='page' value='1'>
 </form>
  </td>
  <td class='b' width=10 background='/images/left.gif'><div style='letter-spacing: 1pt;'>&nbsp;</div></td>

  <td class='w' valign='top'>
   <table border=0 cellspacing=0 cellpadding=10 width='100%' height='100%'>
	<tr>
	 <td valign='top'><script language='JavaScript'>
  // Function to make sure the user wants to delete the class(es) //
  function validate()
  {
   if( document.classes.selectclass.value > 0 )
   {
	var confirmed = confirm("Deleteing a class will also delete the class bulletins, tardies, attendance, assignments, and registrations that occured during that class. \n \nAre you sure?");

	if( confirmed == true )
	{
	 document.classes.submit();
	}
   }
   else
   {
	alert('You must select a class to delete.');
   }
  }


  // Function to make sure only one checkbox has been selected //
  function checkboxes()
  {
   if( document.classes.selectclass.value == 1 )
   {
	document.classes.submit();
   }
   else
   {
	if( document.classes.selectclass.value > 1 )
	{
	 alert('You can only edit one class at a time.');
	}
	else
	{
	 alert(document.classes.selectclass.value);
	 alert('You must select a class to edit.');
	}
   }
  }


  // Function to keep track of how many checkboxes are checked //
  function updateboxes(row)
  {
   row = row + 2;
   if(document.classes.elements[row].checked)
   {
	document.classes.selectclass.value = Math.round(document.classes.selectclass.value) - 1;
   }
   else
   {
	document.classes.selectclass.value = Math.round(document.classes.selectclass.value) + 1;
   }
  }
 </script>

 <h1>Manage Classes</h1>
 <br>
 <form name='classes' action='index.php' method='POST'>

 <table align='center' width='900' cellspacing='0' cellpadding='0' border='0'>
 <b>Semester: </b> <select name='semester' onChange='document.classes.submit();'>

   <option value='-1' >All</option>	 </select>
	 <br><br>
   </td>
  </tr>

 <tr>
 <td>
  <input type='button' value='Add' onClick="document.classes.page2.value='9';document.classes.submit();">
  <input type='button' value='Edit' onClick='document.classes.page2.value=11;checkboxes();'>
  <input type='button' value='Delete' onClick='document.classes.deleteclass.value=1;validate();'>
  <input type='button' value='Show in Grid' onClick='document.classes.page2.value=25;document.classes.submit();' />
  <br><br>
  <table cellspacing='0' width='900' cellpadding='5' class='dynamiclist'>
   <tr class='header'>

	<td>&nbsp;</td>
	<th>Class Name</th>
	<th>Teacher</th>
	<th>Semester</th>
	<th>Section Number</th>
	<th>Room Number</th>

	<th>Period Number</th>
	<th>Days</th>
	<th>Substitute</th>
   </tr> </table>
  <br>
  <input type='button' value='Add' onClick='document.classes.page2.value=9;document.classes.submit();'>
  <input type='button' value='Edit' onClick='document.classes.page2.value=11;checkboxes();'>

  <input type='button' value='Delete' onClick='document.classes.deleteclass.value=1;validate();'>
  <input type='button' value='Show in Grid' onClick='document.classes.page2.value=25;document.classes.submit();' />

  <br><br>
  <font color='red'>* Deleting a class will also delete the information for that class</font>
  <br><br>

  <center>Page: <a href='JavaScript: document.classes.deleteclass.value=0;document.classes.page2.value=0;document.classes.onpage.value=1;document.classes.submit();' class='selectedpagenum' onMouseover="window.status='Go to page 1';return true;" onMouseout="window.status='';return true;">1</a>&nbsp;

</center>
  <input type='hidden' name='deleteclass'>
  <input type='hidden' name='selectclass'>
  <input type='hidden' name='page2' value='0'>
  <input type='hidden' name='onpage' value='1'>
  <input type='hidden' name='logout'>
  <input type='hidden' name='page' value='1'>
 </form>
 </td>

 </tr>
 </table>
 <table width='520' border=0 cellspacing=0 cellpadding=0 height=1>
  <tr>
   <td valign='top'>
   <empty>
   </td>
  </tr>
 </table>

  	 </td>
	</tr>
   </table>

  </td>
   <td class='bv' width=10 background='/images/right.gif'>&nbsp;&nbsp;</font></td>
 </tr>
 <tr>
  <td class='b' width=130 height='10'><empty></td>

  <td class='b' width=10  height='10' background='/images/bottomleft.gif'><empty></td>
  <td class='b' height='10' background='/images/bottom.gif'><empty></td>
  <td class='b' width=10  height='10' background='/images/bottomright.gif'><empty></td>
 </tr>
 <tr>
  <td colspan=4 bgColor='#336699' height='20'>
   <center>
    <span class='footer'>Powered By - </span><a target='_BLANK' href='http://www.primateapplications.com' class='footer'>SchoolMate</a>

   <center>
  </td>
 </tr>
 </table>
 </body>
 </html>